#pragma once

#include "Shapes3D/Point3D.h"
#include "Shapes3D/Direction3D.h"

class Str;
class Point2D;

typedef long INSTANCE_ID;

class Object
{
private:
    bool visible;
    double depth;
    bool preciseCollisions;
    INSTANCE_ID _id;
public:
    Point3D position;
    Direction3D direction;
    
    void __setId(INSTANCE_ID newId);//DO NOT CALL, id is assigned by instance controller
    INSTANCE_ID getId();
    
    //////THESE VIRTUAL FUNCTIONS ARE FUNCTIONS TO DEFINE, NOT TO CALL
    virtual void create();//DO NOT CALL
    virtual void step();//DO NOT CALL
    virtual void draw();//DO NOT CALL
	virtual void drawOrtho();//DO NOT CALL
    virtual void destroyed();//DO NOT CALL
    virtual void collision(Object &obj);//DO NOT CALL
    virtual void globalMouse(int button, Point2D &pt);//DO NOT CALL
    virtual void globalMouseDown(int button, Point2D &pt);//NO NOT CALL
    virtual void globalMouseUp(int button, Point2D &pt);//DO NOT CALL
    virtual void mouse(int button, Point2D &pt);//DO NOT CALL
    virtual void mouseDown(int button, Point2D &pt);//DO NOT CALL
    virtual void mouseUp(int button, Point2D &pt);//DO NOT CALL
    virtual void key(int button);//DO NOT CALL
    virtual void keyDown(int button);//DO NOT CALL
    virtual void keyUp(int button);//DO NOT CALL
    
    
    Object();
    ~Object();
    Object& setVisibility(bool newVisibility);
    bool isVisible();
    bool isInvisible();
    bool preciseCollisionsSet();
    Object& setPreciseCollisions(bool precise);
    Object& setDepth(double newDepth);
    double getDepth();
    
    //Object Controller redirects
    bool getKeyState(char key);
    bool getMouseState(char key);
    Point2D& mouse();
    bool totalObjects(char key);
    
    Object& obj(INSTANCE_ID objId);
    bool destroy(INSTANCE_ID objId);
};